package com.huawei.hms.support.api.pay;

import com.huawei.hms.core.aidl.IMessageEntity;
import com.huawei.hms.support.api.PendingResultImpl;
import com.huawei.hms.support.api.client.ApiClient;
import com.huawei.hms.support.api.client.Result;
import com.huawei.hms.support.api.client.Status;
import com.huawei.hms.support.api.entity.pay.WalletIntentResp;
import com.huawei.hms.support.log.HMSLog;

class HuaweiPayApiImpl$1 extends PendingResultImpl<GetWalletUiIntentResult, WalletIntentResp> {
    HuaweiPayApiImpl$1(ApiClient apiClient, String str, IMessageEntity iMessageEntity) {
        super(apiClient, str, iMessageEntity);
    }

    public final /* synthetic */ Result onComplete(IMessageEntity iMessageEntity) {
        WalletIntentResp walletIntentResp = (WalletIntentResp) iMessageEntity;
        if (walletIntentResp == null || walletIntentResp.getCommonStatus() == null) {
            HMSLog.e("HuaweiPayApiImpl", "WalletUiIntentReq resp is null");
            return null;
        }
        Status commonStatus = walletIntentResp.getCommonStatus();
        Result getWalletUiIntentResult = new GetWalletUiIntentResult();
        getWalletUiIntentResult.setStatus(new Status(commonStatus.getStatusCode(), commonStatus.getStatusMessage(), commonStatus.getResolution()));
        getWalletUiIntentResult.setPendingIntent(walletIntentResp.getPendingIntent());
        HMSLog.i("HuaweiPayApiImpl", "getWalletUiIntent onComplete");
        return getWalletUiIntentResult;
    }
}
